from eb.screen.models import *
from django.contrib import admin

class ChoiceInline(admin.TabularInline):
    model = Choice
    extra = 3


class QuestionAdmin(admin.ModelAdmin):
    fieldsets = [
        (None, {'fields': ['name']}),
        (None, { 'fields' : ['part']})        
    ]
    inlines = [ChoiceInline]
    list_display = ('name', 'part')
    list_filter = ['part']
    search_fields = ['name']
    
class IdeaAdmin(admin.ModelAdmin):
    list_display = ('name', 'user', 'description')
    
class ResultAdmin(admin.ModelAdmin):
    list_display = () 
    
admin.site.register(Question, QuestionAdmin)
admin.site.register(Part)
admin.site.register(Student)
admin.site.register(Idea, IdeaAdmin)